;(function($){
    $.extend($.easing,{
        easeInQuad: function (x, t, b, c, d) {
            return c*(t/=d)*t + b;
        },
        easeOutQuad: function (x, t, b, c, d) {
            return -c *(t/=d)*(t-2) + b;
        },
        easeInOutQuad: function (x, t, b, c, d) {
            if ((t/=d/2) < 1) return c/2*t*t + b;
            return -c/2 * ((--t)*(t-2) - 1) + b;
        },
        easeInCubic: function (x, t, b, c, d) {
            return c*(t/=d)*t*t + b;
        },
        easeOutCubic: function (x, t, b, c, d) {
            return c*((t=t/d-1)*t*t + 1) + b;
        },
        easeInOutCubic: function (x, t, b, c, d) {
            if ((t/=d/2) < 1) return c/2*t*t*t + b;
            return c/2*((t-=2)*t*t + 2) + b;
        },
        easeInQuart: function (x, t, b, c, d) {
            return c*(t/=d)*t*t*t + b;
        },
        easeOutQuart: function (x, t, b, c, d) {
            return -c * ((t=t/d-1)*t*t*t - 1) + b;
        },
        easeInOutQuart: function (x, t, b, c, d) {
            if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
            return -c/2 * ((t-=2)*t*t*t - 2) + b;
        },
        easeInQuint: function (x, t, b, c, d) {
            return c*(t/=d)*t*t*t*t + b;
        },
        easeOutQuint: function (x, t, b, c, d) {
            return c*((t=t/d-1)*t*t*t*t + 1) + b;
        },
        easeInOutQuint: function (x, t, b, c, d) {
            if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
            return c/2*((t-=2)*t*t*t*t + 2) + b;
        },
        easeInSine: function (x, t, b, c, d) {
            return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
        },
        easeOutSine: function (x, t, b, c, d) {
            return c * Math.sin(t/d * (Math.PI/2)) + b;
        },
        easeInOutSine: function (x, t, b, c, d) {
            return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
        },
        easeInExpo: function (x, t, b, c, d) {
            return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
        },
        easeOutExpo: function (x, t, b, c, d) {
            return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
        },
        easeInOutExpo: function (x, t, b, c, d) {
            if (t==0) return b;
            if (t==d) return b+c;
            if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
            return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
        },
        easeInCirc: function (x, t, b, c, d) {
            return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
        },
        easeOutCirc: function (x, t, b, c, d) {
            return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
        },
        easeInOutCirc: function (x, t, b, c, d) {
            if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
            return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
        },
        easeInElastic: function (x, t, b, c, d) {
            var s=1.70158;var p=0;var a=c;
            if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
            if (a < Math.abs(c)) { a=c; var s=p/4; }
            else var s = p/(2*Math.PI) * Math.asin (c/a);
            return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
        },
        easeOutElastic: function (x, t, b, c, d) {
            var s=1.70158;var p=0;var a=c;
            if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
            if (a < Math.abs(c)) { a=c; var s=p/4; }
            else var s = p/(2*Math.PI) * Math.asin (c/a);
            return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
        },
        easeInOutElastic: function (x, t, b, c, d) {
            var s=1.70158;var p=0;var a=c;
            if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
            if (a < Math.abs(c)) { a=c; var s=p/4; }
            else var s = p/(2*Math.PI) * Math.asin (c/a);
            if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
            return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
        },
        easeInBack: function (x, t, b, c, d, s) {
            if (s == undefined) s = 1.70158;
            return c*(t/=d)*t*((s+1)*t - s) + b;
        },
        easeOutBack: function (x, t, b, c, d, s) {
            if (s == undefined) s = 1.70158;
            return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
        },
        easeInOutBack: function (x, t, b, c, d, s) {
            if (s == undefined) s = 1.70158;
            if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
            return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
        },
        easeInBounce: function (x, t, b, c, d) {
            return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
        },
        easeOutBounce: function (x, t, b, c, d) {
            if ((t/=d) < (1/2.75)) {
                return c*(7.5625*t*t) + b;
            } else if (t < (2/2.75)) {
                return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
            } else if (t < (2.5/2.75)) {
                return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
            } else {
                return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
            }
        },
        easeInOutBounce: function (x, t, b, c, d) {
            if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
            return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
        }
    });
   
    $.dlm = $.dlm||{};
    $.dlm={
        inits:function(){
            var _this = this;
            $(".ind-tab").IndTab();
            $(this).IndMiao();
            $(".dp-box").Logdp();
            $(".com-ord").Formyz();
            setTimeout(function(){
            	var i = 156;
	            var a=1;
	            setInterval(function(){
	            	i=i+a;
	            	if(i==170){
	            		a=-1
	            	}
	            	if(i==156){
	            		a=1;
	            	}
	            	$(".heart").animate({
	            		top:i,
	            		opacity:1
	            	},50);
	            },10);
            },1000);
            
		    $(".bMenu ul li").hover(function(){
				$(this).find(".icon em,p").css("color","#ffff00");
				$(this).find(".icon").css('background','#005f99');
			},function(){
				$(this).find(".icon em,p").css("color","#FFFFFF");
				$(this).find(".icon").css('background','#0081d0');
			});
			$(".bMenu ul li").bMenu();
			$(".HelpbannerContnet").Hcontent();
			
	       	$(".twoLevel a").hover(function(){
				var hasClass = $(this).hasClass('nowpage');
				if(!hasClass){
					$(this).addClass("on").css({background:'#e8f8fe',color:'#666666'});
				}
			},function(){
				var hasClass = $(this).hasClass('nowpage');
				if(!hasClass){
					$(this).removeClass("on").css({background:'#FFFFFF',color:'#666666'});
				}
			});
			
			$(".lmContent li .oneLevel").click(function(){
				var display = $(this).parent().find(".twoLevel").css("display");
				if(display=="none"){
					$(this).parent().find(".twoLevel ,.arrowD").show();
					$(this).parent().find(".arrow").hide();
				}else{
					$(this).parent().find(".twoLevel,.arrowD").hide();
					$(this).parent().find(".arrow").show();
				}
				$(this).parent().siblings().find(".twoLevel,.arrowD").hide();
				$(this).parent().siblings().find(".arrow").show();
			});
			$(".rightMenu a").hover(function(){
				$(this).parent().find(".aLayer").show();
			},function(){
				$(this).parent().find(".aLayer").hide();
			});
			
        },
        IndTab:function(){
        	$(this).find("li").hover(function(){
        		$(this).addClass("on").siblings("li").removeClass("on");
        		var flag = $(this).index();
        		$(".indtab-item").eq(flag).show().siblings().hide().css("opacity",0);
        		$(".indtab-item").eq(flag).siblings().find(".indtab-l").css("left","-64px");
        		$(".indtab-item").eq(flag).siblings().find(".indtab-r").css("right","-30px");
        		$(".indtab-item").eq(flag).find(".indtab-l").stop().animate({
        			left:[0,'easeOutBounce']
        		},500);
	            $(".indtab-item").eq(flag).find(".indtab-r").stop().animate({
        			right:[10,'easeOutBounce']
        		},500);
	            $(".indtab-item").eq(flag).stop().animate({
        			opacity:1
        		},500);
        	})
        },
        IndMiao:function(){
        	$(".f-1").animate({
        		bottom:[348,'easeOutBounce']
        	},500,function(){
        		$(this).find("span").animate({opacity:1},500);
        	});
        	$(".f-2").delay(200).animate({
        		bottom:[344,'easeOutBounce']
        	},500,function(){
        		$(this).find("span").animate({opacity:1},500);
        	});
        	$(".f-3").delay(400).animate({
        		bottom:[211,'easeOutBounce']
        	},500,function(){
        		$(this).find("span").animate({opacity:1},500);
        	});
        	$(".f-4").delay(600).animate({
        		bottom:[225,'easeOutBounce']
        	},500,function(){
        		$(this).find("span").animate({opacity:1},500);
        	});
        	$(".f-5").delay(800).animate({
        		bottom:[90,'easeOutBounce']
        	},500,function(){
        		$(this).find("span").animate({opacity:1},500);
        	});
        	$(".f-6").delay(1000).animate({
        		bottom:[64,'easeOutBounce']
        	},500,function(){
        		$(this).find("span").animate({opacity:1},500);
        	});
        	$(".miao-xian-l").delay(1300).animate({
        		width:247
        	},500);
        	$(".miao-xian-r").delay(1300).animate({
        		width:264
        	},500);
        	var xing  = setInterval(liang,2000);
        	function liang(){
        		$(".tip-dian2").animate({fontSize:37,opacity:0},400).delay(400).animate({fontSize:14,opacity:1},100);
        	};
        	var yun1  = setInterval(yun01,30000);
        	function yun01(){
	        	$(".yun-1").animate({
	        		bottom:-780
	        	},30000,"linear",function(){
	        		$(this).css("bottom",460);
	        	});
        	};        	
        	yun01();
        	var yun2  = setInterval(yun02,20000);
        	function yun02(){
	        	$(".yun-2").animate({
	        		bottom:-480
	        	},20000,"linear",function(){
	        		$(this).css("bottom",560);
	        	});
        	};        	
        	yun02();
        	var yun3  = setInterval(yun03,20000);
        	function yun03(){
	        	$(".yun-3").animate({
	        		bottom:-200
	        	},20000,"linear",function(){
	        		$(this).css("bottom",600);
	        	});
        	};        	
        	yun03();
        	var yun4  = setInterval(yun04,15000);
        	function yun04(){
	        	$(".yun-4").animate({
	        		bottom:-200
	        	},15000,"linear",function(){
	        		$(this).css("bottom",700);
	        	});
	        	$(".yun-5").animate({
	        		bottom:-200
	        	},15000,"linear",function(){
	        		$(this).css("bottom",700);
	        	});
        	};        	
        	yun04();
        },
        bMenu:function(){/*0 160 320*/
       	    var speed = 600;
        	$(this).eq(0).css({'left':'0px','top':'80px'});
        	$(this).eq(1).css({'left':'160px','top':'80px'});
        	$(this).eq(2).css({'left':'320px','top':'80px'});
        	$(this).eq(3).css({'left':'0px','top':'232px'});
        	$(this).eq(4).css({'left':'160px','top':'232px'});
        	$(this).eq(5).css({'left':'320px','top':'232px'});
        	$(this).eq(6).css({'left':'0px','top':'384px'});
        	$(this).eq(7).css({'left':'160px','top':'384px'});
        	$(this).eq(8).css({'left':'320px','top':'384px'});
        	$(this).eq(0).delay(800).animate({
        		opacity:1,
        		top:30
        	},speed-200);
        	$(this).eq(1).delay(800).animate({
        		opacity:1,
        		top:30
        	},speed-200);
        	$(this).eq(2).delay(800).animate({
        		opacity:1,
        		top:30
        	},speed-200);
        	
        	
        	$(this).eq(3).delay(1000).animate({
        		opacity:1,
        		top:182
        	},speed-200);
        	$(this).eq(4).delay(1000).animate({
        		opacity:1,
        		top:182
        	},speed-200);
        	$(this).eq(5).delay(1000).animate({
        		opacity:1,
        		top:182
        	},speed-200);
        	
        	
        	
        	$(this).eq(6).delay(1200).animate({
        		opacity:1,
        		top:334
        	},speed-200);
        	$(this).eq(7).delay(1200).animate({
        		opacity:1,
        		top:334
        	},speed-200);
        	$(this).eq(8).delay(1200).animate({
        		opacity:1,
        		top:334
        	},speed-200);
       	 },
       	 Hcontent:function(){
       	 	$(this).find(".mao").delay().animate({
        		left:[-70,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".plane").delay(300).animate({
        		top:[58,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".wenhao").delay(400).animate({
        		top:[54,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".word").delay(500).animate({
        		top:[190,'easeOutBounce'],
        		opacity:1
        	},500);
        	
        	$(this).find(".book1").delay(600).animate({
        		top:[352,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".dianao").delay(700).animate({
        		top:[320,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".curve4").delay(800).animate({
        		top:[438,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".book2").delay(800).animate({
        		top:[438,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".curve1").delay(800).animate({
        		top:[474,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".curve2").delay(800).animate({
        		top:[482,'easeOutBounce'],
        		opacity:1
        	},500);
        	$(this).find(".curve3").delay(800).animate({
        		top:[474,'easeOutBounce'],
        		opacity:1
        	},500);
       	 },
       
        Logdp:function(){
        	$(this).find("div").css("opacity","0");
        	$(this).find(".pansen").stop().animate({
    			left:-6,
    			opacity:1
    		},1000);
    		$(this).find(".dema").stop().animate({
    			right:-74,
    			opacity:1
    		},1000);
       },
       Formyz:function(){
       		$(this).find("p").each(function(){
       			var va = $(this).find("input").val();
       			if(va !== ""){
       				$(this).find("span").hide();
       			}
       		});
       		$(this).find("p").children().children("input").focus(function () {
				$(this).parent().parent("p").find("em").fadeOut(500);
				$(this).parent().parent("p").removeClass("error");
			});
       }
        
    }
    $.extend($.fn,$.dlm);
    $(function(){$.dlm.inits();})
})(jQuery);
function wriRes(val,obj){
	if(val == ""){
		$(obj).next("span").show();
	}else {
		$(obj).next("span").hide();
	}
}
